package com.example;

import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.junit.runner.RunWith;
import org.springframework.test.annotation.Rollback;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:META-INF/applicationContext.xml", "classpath:META-INF/spring-mvc.xml" })
@Transactional(transactionManager = "transactionManager")
@Rollback(value = true)

public class BaseTestCaseJunit44 {

    // test function can not accept args
    @Rule
    public TestName name = new TestName();

    @Before
    public void before() {
        System.out.println("********************" + " START ***************************");
        System.out.println("Test: " + name.getMethodName());
    }

    @After
    public void after() {
        System.out.println("********************" + " END ***************************");
    }

    @Test
    public void testBase() {

    }

}
